export function toTimeString(dateTime) {
  let timeString = 'null'
  if (dateTime) {
    timeString = toDateString(dateTime) + ' ' + [String(dateTime.hour).padStart(2, '0'),
      String(dateTime.minute).padStart(2, '0'), String(dateTime.second).padStart(2, '0')].join(':')
  }
  return timeString
}

export function toDateString(date) {
  let dateString = 'null'
  if (date) {
    dateString = [date.year, String(date.monthValue).padStart(2, '0'), String(date.dayOfMonth).padStart(2, '0')].join('-')
  }
  return dateString
}
